<div class="layui-side layui-side-menu">
    <div class="layui-side-scroll">
        <div class="layui-logo" lay-href="home/console.html">
            <span>{{env('APP_NAME')}}</span>
        </div>

        <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
            @php
                $menuList = \App\Forms\RbacForms::getAdminMenu();
            @endphp
            @if(count($menuList))

                @foreach($menuList as $item)

                    <li data-name="home" class="layui-nav-item">
                        <a href="javascript:;" @if(!count($item['children']))lay-href="{{url((string)$item['url'])}}"@endif
                        lay-tips="{{$item['name']}}" lay-direction="2">
                            <i class="layui-icon {{$item['icon']}}"></i>
                            <cite>{{$item['name']}}</cite>
                        </a>

                        @if(count($item['children']))
                            @foreach($item['children'] as $item2)

                            <dl class="layui-nav-child">
                                <dd>
                                    <i class="layui-icon {{$item2['icon']}}"></i>
                                    <a lay-href="{{url((string)$item2['url'])}}">{{$item2['name']}}</a>
                                </dd>
                            </dl>

                            @endforeach
                        @endif
                    </li>

                @endforeach

            @endif

        </ul>
    </div>
</div>